/*
 --== Foogal Template Application ==--
Click the mouse to make an image appear, release the mouse to make it disappear
Hold C to add red to the background, the red will reset when it gets too high
Press G to make the background bright green, release to change it back
*/

#include "Foogal.h"
using namespace Foogal;

int main(int argc, char *argv[])
{
	initialize();
	
	Image hello(SDL_LoadBMP("gfx/hello.bmp"));
	
	updateScreen();
	
	while (1) {
		
		updateInput();
		
		if (keyPress(SDLK_g)) Settings::BGGreen = 0xFF;
		if (keyRelease(SDLK_g)) Settings::BGGreen = 0x55;
		if (keyHeld(SDLK_c)) Settings::BGRed += 4;
		
		if (Mouse::leftHeld && Mouse::moved) {
			hello.move(Mouse::x, Mouse::y);
			hello.draw();
		}
		
		updateScreen();
		wait();
		clearScreen();
	}
	
	return 0;
	
}
